﻿using Agile.Infra.Core.Agile.ViewModel;

namespace Agile.Infra.Core.Agile.Extensions;

public static class PageModelExtensions
{
    public static PageModel<T> ToPageModel<T>(this List<T> @this, int pageIndex, int pageSize, int totalCount = 0)
    => new PageModel<T>() { TotalCount = totalCount, PageIndex = pageIndex, PageSize = pageSize, Data = @this };
}
